perm filename INTOPS.PAL[AL,HE]5 blob
sn#341240 filedate 1978-03-10 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 .SBTTL Table of interpreter instructions
C00013 ENDMK
C⊗;
.SBTTL Table of interpreter instructions
COMMENT ⊗
This table is parallel to the file INTDEF.SAI[AL,HE]. It is required
at several places in the interpreter; each of these can define the
macro MAKEOP however desired. The convention here for types of
arguments that each pseudo-op takes is this:
a absolute address
la list of absolute addresses
o offset or level-offset pair
lo list of offsets or level-offset pairs
n small constant
r50 word of radix 50
⊗
PCVERSION == 7 ;Fix this every time you add some new pcodes
II == 2 ;Start of interpreter jump table (0 is illegal instruction)
;Motion control
MAKEOP XMOVE,MOVE,<a> ;Prepare, execute move whose traj table is at a.
MAKEOP XCENTER,CENTER,<a>, ;Center using traj table at a.
MAKEOP XSTOP,STOP,<n> ;Cause all mechanisms whose bits are on in n to stop.
MAKEOP XTFRCST,TFRCST,<n> ;Initializes force system, force frame on stack
; control bits in <n>
MAKEOP XVMKFRC,VMKFRC ;Gets vector off stack, makes a force frame along vector
; and puts it on the stack
MAKEOP XCOMPLY,COMPLY,<n> ;Sets up compliant motion in next move
;Gets force magnitude off stack, control bits in <n>
MAKEOP XCMPOFF,CMPOFF,<n> ;Turns off compliant motion in current move (not used)
MAKEOP XNOTICE,NOTICE ;Make sure everyone knows where the arm is.
;Variables
MAKEOP XMVAR,MVAR,<lo> ;Make graph node for given offsets (list arg)
MAKEOP XKVAR,KVAR,<lo> ;Kill graph node at given offsets (list arg)
MAKEOP XGLBLNK,GLBLNK,<lo,r50,r50>
;Link global given by r50,r50 into level-offset lo.
MAKEOP XMAKEVT,MAKEVT,<lo> ;Make event variables with offsets as in list.
MAKEOP XDESEVT,DESEVT,<lo> ;Kill event variables with offsets as in list.
MAKEOP XMEXP,MEXP,<lo,a,o> ;Make an expression whose needed list is lo
; at address a, and call it offset o.
MAKEOP XMCLC,MCLC,<o,o>;Make the expression at level-offset o1 a calculator
; for the variable at o2.
MAKEOP XDCLC,DCLC,<o,o>;Unmake the expression at level-offset o1 a calculator
; for the variable at o2.
MAKEOP XMCHG,MCHG,<o,a>;Make a changer for variable at level-offset o at address a.
MAKEOP XGTOLD,GTOLD ;Get the old value for current changer.
MAKEOP XGTNEW,GTNEW ;Get the new value for current changer.
;Stack operations
MAKEOP XGTVAL,GTVAL,<o>;Push value of arg (level-offset pair).
MAKEOP XIGTVAL,IGTVAL,<a> ;Push arg (immediate).
MAKEOP XCHNGE,CHNGE,<o>;Pop value into arg (level-offset pair).
MAKEOP XICHNGE,ICHNGE,<a>;Pop value into arg (immediate).
MAKEOP XPUSH, PUSH,<a> ;Push arg directly (as a ptr) onto stack. For cnstnts.
MAKEOP XPOP, POP ;Pop stack.
MAKEOP XCOPY, COPY ,<n>;Copy n'th down to top of stack.
MAKEOP XREPLAC,REPLAC,<n> ;Replace n'th down with top (which pop)
MAKEOP XFLUSH,FLUSH ;Flush the entire stack.
;Flow of control
MAKEOP XJUMP, JUMP, <a> ;Jump to address
MAKEOP XJUMPC,JUMPC,<a> ;Jump to address if "true"
MAKEOP XTERMINATE,TERMINATE ;Terminate this interpreter
MAKEOP XENDCLC,ENDCLC ;Return from calculator cell
MAKEOP XPROC, PROC,<a,lo> ;Call a procedure at a, with arg list lo
MAKEOP XRETURN,RETURN ;Return from procedure
MAKEOP XSPROUT,SPROUT;la ;Sprout interpreters at each arg, wait (list arg)
MAKEOP XFORCHK,FORCHK,<a> ;Do a FOR-loop check, and fail to location d.
MAKEOP XSIGNAL,SIGNAL,<o> ;Signal event at level-offset o.
MAKEOP XWAITE,WAITE,<o> ;Wait on event at level-offset o.
MAKEOP XPAUSE,PAUSE ;Pause in seconds (on stack)
MAKEOP XABORT,ABORT ;Abort current motions
MAKEOP XDDT,GODDT ;go to DDT.
;Boolean
MAKEOP XSLE,SLE ;S≤S compare top two elts, pop, pop, push answer
MAKEOP XSLT,SLT ;S<S true := 1.0
MAKEOP XSGE,SGE ;S≥S false:= 0
MAKEOP XSGT,SGT ;S>S
MAKEOP XSEQ,SEQ ;S=S
MAKEOP XSNE,SNE ;S≠S
MAKEOP XAND,AND ;S∧S (logical and)
MAKEOP XLOR,LOR ;S∨S (logical or)
MAKEOP XNOT,NOT ;¬S (logical not) note: this only takes one arg
;Arithmetic
MAKEOP XWHERE,WHERE,<n> ;Push the current location of mechanism n
MAKEOP XSADD, SADD ;S+S: Add top two elts, pop, pop, push answer
MAKEOP XSSUB, SSUB ;S-S: Sub top two elts, pop, pop, push answer
MAKEOP XSNEG, SNEG ;-S: Negate top elt, pop, push answer
MAKEOP XSMUL, SMUL ;S*S: Mul top two elts, pop, pop, push answer
MAKEOP XSDIV, SDIV ;S/S: Div top two elts, pop, pop, push answer
MAKEOP XVMAGN, VMAGN ;S ← norm of vector
MAKEOP XVDOT, VDOT ;S ← vector dot vector
;PVDOT ;S ← vector dot vector all 4 cells
MAKEOP XCROSV,CROSV ;Vector ← vector cross vector
MAKEOP XSSBRTN,SSBRTN,<n> ;S ← SBRTN[n](top scalar elt)
MAKEOP XTMAGN,TMAGN ;S ← extracts angle of rotation from trans
MAKEOP XTAXIS,TAXIS ;V ← extracts axis of rotation from trans
MAKEOP XVMAKE,VMAKE ;V ← vector(scalar,scalar,scalar)
MAKEOP XSVMUL,SVMUL ;V ← scalar * vector
MAKEOP XVADD, VADD ;V ← vector + vector
MAKEOP XVSUB, VSUB ;V ← vector - vector
MAKEOP XUNITV,UNITV ;Vector ← vector / its norm
;CROSV remove ;Vector ← vector cross vector
MAKEOP XTVMUL,TVMUL ;Vector ← trans * vector
MAKEOP XTPOS,TPOS ;Vector ← translation_part_of_trans
MAKEOP XTORIEN,TORIEN ;T ← rotation_part_of_trans
MAKEOP XVSAXWR,VSAXWR ;T ← rotation(vector,angle)
MAKEOP XTMAKE,TMAKE ;T ← trans(rot,vector)
MAKEOP XTVADD,TVADD ;T ← t + v
MAKEOP XTVSUB,TVSUB ;T ← t - v
;FTOF ;T ← INV(t1) * t2 done by TTMUL(TINVRT(t1),t2) in pcode
MAKEOP XTTMUL,TTMUL ;T ← trans * trans
MAKEOP XTINVRT,TINVRT ;T ← inverse(trans)
;Condition monitors
MAKEOP XCMMAK,CMMAK,<o,t,a> ;Make a c-m at offset o of type t starting at a
MAKEOP XCMENBL,CMENBL,<o> ;Enable c-m at level-offset o
MAKEOP XCMDSBL,CMDSBL,<o> ;Disable c-m at level-offset o
MAKEOP XCMDEST,CMDEST,<lo> ;Destroy c-m at offset lo (list arg)
MAKEOP XCMTRIG,CMTRIG ;Trigger the c-m body (use only in checker)
MAKEOP XCMSKED,CMSKED,<n> ;Sleep for n mills (use only in checker)
MAKEOP XCMUNCR,CMUNCR ;Start uncritical section
MAKEOP XCMDONE,CMDONE ;Ends force/hardware/duration c-m's, if c-m was
; re-enabled then restarts it, else dismisses it
MAKEOP XCMFORCE,CMFORCE ;Initialize force sensing - vector & level on stack
MAKEOP XCMSENSE,CMSENSE ;Initialize hardware sensing
MAKEOP XCMDUR,CMDUR ;Wait for set time, then start up c-m
;Initialization
MAKEOP XPROG,PROG ;Initialize mechanism variables
MAKEOP XENDP,ENDP ;Clean up mechanism variables
;Debugging aids
MAKEOP XPRINT,PRINT ;Type an ASCIZ string on the VT05.
MAKEOP XVALPRN,VALPRN ;Type a value, whatever type it is, and pop it.
MAKEOP XVARPRN,VARPRN,<o> ;Type a variable (level-offset), whatever type.
MAKEOP XBRACE,NOOP ;Bracepoint in the program (break or trace)
MAKEOP XNOOP,NOOP ;Null operation
MAKEOP XTOPAL,TOPAL ;Escape to PAL